﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="XSSJICKHAdd.aspx.cs" Inherits="XSSJ_XSSJICKHAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
  <link href="../images/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <form id="form1" runat="server">
  <table width="615" border="1" cellspacing="0" cellpadding="0" class="table1">
    <tr height="20">
      <td width="25%" align="right" bgcolor="#E7E7E7">
        客户编码
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <asp:Label ID="lbKHID" runat="server" Text=""></asp:Label>
      </td>
    </tr>
    <tr height="20">
      <td width="25%" align="right" bgcolor="#E7E7E7">
        客户名称
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <%--<asp:TextBox ID="txtKHName" runat="server"></asp:TextBox>
        <asp:Button ID="btnKH" runat="server" Text="查询" OnClick="btnKH_Click" />
        <asp:DropDownList ID="ddlKH" runat="server">
        </asp:DropDownList>--%>
        <asp:Label ID="lbKHMC" runat="server" Text=""></asp:Label>
        <%--  <asp:Label ID="lbKHJB" runat="server" Text="" Visible="false"></asp:Label>
        <asp:Label ID="lbIC" runat="server" Text="" Visible="false"></asp:Label>
        <asp:Label ID="lbJG" runat="server" Text="0" Visible="false"></asp:Label>
        <asp:Label ID="lbJJ" runat="server" Text="0" Visible="false"></asp:Label>--%>
        <%--<asp:Label ID="lbYQXZ" runat="server" Text="0" Visible="false"></asp:Label>--%>
      </td>
    </tr>
    <tr height="20">
      <td width="25%" align="right" bgcolor="#E7E7E7">
        标识
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <asp:Label ID="lbBS" runat="server" Text="&nbsp"></asp:Label>
      </td>
    </tr>
    <tr height="20">
      <td width="25%" align="right" bgcolor="#E7E7E7">
        上次抄表时间
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <asp:Label ID="lbSCCBSJ" runat="server" Text="&nbsp"></asp:Label>
      </td>
    </tr>
    <tr height="20">
      <td width="25%" align="right" bgcolor="#E7E7E7">
        上次表数
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <asp:Label ID="lbSCBS" runat="server" Text="&nbsp"></asp:Label>
      </td>
    </tr>
    <tr height="20">
      <td width="25%" align="right" bgcolor="#E7E7E7">
        上次抄表人
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <asp:Label ID="lbSCCBR" runat="server" Text="&nbsp"></asp:Label>
      </td>
    </tr>
    <tr>
      <td width="25%" align="right" bgcolor="#E7E7E7">
        抄表时间
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <table>
          <tr>
            <td>
              <dxe:ASPxDateEdit ID="dateJG" runat="server" EditFormatString="yyyy-MM-dd">
              </dxe:ASPxDateEdit>
            </td>
            <td>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                ControlToValidate="dateJG"></asp:RequiredFieldValidator>
              <asp:HiddenField ID="hlJG" runat="server" />
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td width="25%" align="right" bgcolor="#E7E7E7">
        抄表人
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <%--<asp:TextBox ID="txtCBR" runat="server" Width="200px"></asp:TextBox>--%>
        <asp:DropDownList ID="ddlCBR" runat="server">
        </asp:DropDownList>
        <asp:HiddenField ID="hlCBR" runat="server" />
      </td>
    </tr>
    <tr height="20">
      <td align="right" bgcolor="#E7E7E7">
        付款方式
      </td>
      <td bgcolor="#FFFFFF">
        <asp:DropDownList ID="ddlFKFS" runat="server">
        </asp:DropDownList>
        <asp:HiddenField ID="hlFKFS" runat="server" />
      </td>
    </tr>
    <tr>
      <td width="25%" align="right" bgcolor="#E7E7E7">
        本次用气
      </td>
      <td width="75%" bgcolor="#FFFFFF">
        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
          ControlToValidate="txtName"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator1"
            runat="server" ErrorMessage="请输入自然数" ControlToValidate="txtName" MaximumValue="100000000"
            MinimumValue="0" Type="Integer"></asp:RangeValidator>
        <asp:HiddenField ID="hlName" runat="server" />
        <asp:HiddenField ID="lbJG" runat="server" Visible="true" />
        <asp:HiddenField ID="lbJJ" runat="server" Visible="true" />
        <asp:HiddenField ID="lbYQXZ" runat="server" Visible="true" />
        <%-- <asp:Label ID="lbJG" runat="server" Text="" Visible="false"></asp:Label>
        <asp:Label ID="lbJJ" runat="server" Text="" Visible="false"></asp:Label>
        <asp:Label ID="lbYQXZ" runat="server" Text="" Visible="false"></asp:Label>--%>
      </td>
    </tr>
    <%--  <asp:Panel ID="Panel2" runat="server">Visible="false"
      <tr>
        <td width="25%" align="right" bgcolor="#E7E7E7" height="20">
          上月表数
        </td>
        <td width="75%" bgcolor="#FFFFFF">
          <asp:Label ID="lbSYBS" runat="server" Text="&nbsp;"></asp:Label>
        </td>
      </tr>
      <tr>
        <td width="25%" align="right" bgcolor="#E7E7E7" height="20">
          实际使用气量
        </td>
        <td width="75%" bgcolor="#FFFFFF">
          <asp:Label ID="lbSJSYQL" runat="server" Text="&nbsp;"></asp:Label>
        </td>
      </tr>
      <tr>
        <td width="25%" align="right" bgcolor="#E7E7E7" height="20">
          本月应收气量
        </td>
        <td width="75%" bgcolor="#FFFFFF">
          <asp:TextBox ID="txtYSQL" runat="server"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
            ControlToValidate="txtYSQL"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeValidator2"
              runat="server" ErrorMessage="请输入数字" ControlToValidate="txtYSQL" MaximumValue="1000000"
              MinimumValue="0" Type="Double"></asp:RangeValidator>
        </td>
      </tr>
    </asp:Panel>
    <asp:Repeater ID="Panel1" runat="server">
    </asp:Repeater>--%>
  </table>
  <table width="615">
    <tr>
      <td align="center">
        <table>
          <tr>
            <td>
              <dxe:ASPxButton ID="btnConfirm" runat="server" Text="保存" Font-Size="14px" AutoPostBack="False"
                OnClick="btnConfirm_Click">
                <ClientSideEvents Click="function(s,e) {
                var bqjy=a();
                e.processOnServer = confirm('本次收费为'+bqjy+'，确认保存?'); 
                if(e.processOnServer){b();} }" />
              </dxe:ASPxButton>
              </dxe:ASPxButton>
            </td>
            <td>
              <dxe:ASPxHyperLink ID="hlQLMX" runat="server" Text="气量明细" Font-Size="14px" NavigateUrl="XSSJQLMX.aspx"
                Visible="false">
              </dxe:ASPxHyperLink>
            </td>
            <td>
              <dxe:ASPxHyperLink ID="ASPxHyperLink1" runat="server" Text="返回" Font-Size="14px"
                NavigateUrl="XSSJICKHList.aspx" Width="40px">
                <Border BorderWidth="1px" />
              </dxe:ASPxHyperLink>
            </td>
            <td>
              <asp:Label ID="lbMessage" runat="server" Text="" ForeColor="Red"></asp:Label>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  </form>
</body>
<script language="javascript">
  function a() {
    var a = document.getElementById("lbJG").value;
    var jj = document.getElementById("lbJJ").value;
    var b = document.getElementById("txtName").value;
    var c = Math.ceil((b * (parseFloat(jj) + parseFloat(a)) * 100).toFixed(1)) / 100;
//    var c = (b * (parseFloat(jj) + parseFloat(a)) * 100);
    return c;
  }
  function b() {
    document.getElementById("btnConfirm").style.display = "none";
  }
  function c() {
    var b = document.getElementById("txtName").value;
    if (b.length == 0)
      return false;
    else return true;
  }
</script>
</html>
